package shared.highcharts.config

import dataclass.data

@data class HighchartsConfig(
                              chart: Option[Chart],
                              title: Option[Title],
                              yAxis: Option[YAxis],
                              xAxis: Option[XAxis],
                              series: Option[Seq[SeriesAny]],
                              credits: Option[Credits],
                            )

object HighchartsConfig {
  def apply(
             chart: Chart = null,
             title: Title = null,
             yAxis: YAxis = null,
             xAxis: XAxis = null,
             series: Seq[SeriesAny] = null,
             credits: Credits = null,
           ) = new HighchartsConfig(
    Option(chart),
    Option(title),
    Option(yAxis),
    Option(xAxis),
    Option(series),
    Option(credits),
  )
}
